package com.ophiux.wechat.controller;

import com.ophiux.common.core.base.Result;
import com.ophiux.wechat.model.dto.OphiuxProblemAnswerAddDTO;
import com.ophiux.wechat.model.entity.OphiuxProblemAnswer;
import com.ophiux.wechat.service.OphiuxProblemAnswerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @desc:
 * @author: hhl
 * @date：2023/5/4 17:11
 */
@RestController
@RequestMapping("/problemAnswer")
@Api(tags = "问题答案API")
public class ProblemAnswerController {

    @Autowired
    private OphiuxProblemAnswerService ophiuxProblemAnswerService;

    @ApiOperation("提交答案")
    @PostMapping("/saveAnswer")
    public Result saveAnswer(@RequestBody OphiuxProblemAnswerAddDTO vo){
        return ophiuxProblemAnswerService.saveAnswer(vo);
    }

}
